<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
<base href="<%=basePath%>">
<head>
    <meta charset="UTF-8">
    <meta name="Keywords" content="关键词,关键词">
    <meta name="description" content="">
    <title></title>
    <script type="text/javascript" src="js/jquery-3.3.1.min.js"></script>
    <script type="text/javascript" src="js/jquery.js"></script>
    <script type="text/javascript" src="js/toastr.js"></script>
    <link rel="stylesheet" href="css/base.css" type="text/css"/>
    <link rel="stylesheet" href="css/headbott.css" type="text/css"/>
    <link rel="stylesheet" href="css/toastr.css" type="text/css"/>
    <!-- Chang URLs to wherever Video.js files will be hosted -->
    <link href="css/video-js.css" rel="stylesheet" type="text/css">
    <link href="css/product-detail.css" rel="stylesheet" type="text/css">
    <!-- video.js must be in the <head> for older IEs to work. -->
    <script type="text/javascript" src="js/video.js"></script>


</head>
<body>
<div id="header">
    <div class="heade-con">
        <div class="logo"><a href=""><img src="images/LOGO.png"/></a></div>
        <div class="nav posa">
            <ul>
                <li><a href="index.do">首页</a></li>
                <li><a class="vcolor" href="project/queryByType.do">公益众筹</a></li>
                <li><a href="problem/queryAll.do">常见问题</a></li>
                <li><a href="ly-listdo">众筹资讯</a></li>
                <li><a href="new_info.do" style="">发布项目</a></li>
			</ul>
        </div>
        <div class="search">
            <form action="">
                <input type="text" class="search-txt" value="找项目">
                <input type="submit" class="search-but" value="">
            </form>
        </div>
        <div class="index-login">
           <c:choose>
					<c:when test="${login_user!=null }">
						<a href="project/queryByUsId.do">${login_user.usAccount }</a>
						<a href = "user/quit.do">退出</a>
					</c:when>
					<c:otherwise>
						<a href="login.do">登录</a>
						<span style="color: white;">|</span>
						<a href="reg.do">注册</a>
					</c:otherwise>
				</c:choose>
				
				
        </div>
    </div>
</div>
<script>

  var d_var=$(".search .search-txt").val();
    $(".search .search-txt").focus(function(){
        if($(this).val()==d_var){
            $(this).val("");
        }});

    $(".search .search-txt").blur(function(){
        if($(this).val()==""){
            $(this).val("找项目");
        }
    });
</script>

<div class="p-detail_con">
<div class="p-detail_contit">
    <h1>${now_project.psFile }</h1>
    <div class="p-detail_cfx">
        <span class="p-detail_contit"><a href=""><i></i>分享</a></span>
        <span class="p-detail_contit2"><a href=""><i></i>点赞</a></span>
    </div>
    <div class="p-detail_cfx2">
        <ul>
            <li class="p-detail_cfx2-1">发起人</li>
            <li class="p-detail_cfx2-2">${now_project.usName }<span>|</span></li>
            <li class="p-detail_cfx2-3">${now_project.usAddress }<span>|</span></li>
            <li class="p-detail_cfx2-4"></li>
        </ul>
    </div>
    </div>

    <div class="p-detail-tab2">
        <ul>
            <li><a class="p-detail-tab2-tb2" href="project/queryById.do?ps_id=${now_pro_com[0].cmPsId }">项目主页</a></li>
            <li><a class="p-detail-tab2-tb" href="javascript:void(0)">评论(${count_com.count })</a></li>
        </ul>
    </div>
    <div class="p-detail_con2">
    	<input type="text" id = "cm_content">
       		<font color="blue" > <a href="javascritp:void(0)" onclick="addCom()" >发表评论</a> </font> 
		<c:forEach items="${now_pro_com }" var="com">
				<br><h4><fmt:formatDate value="${com.cmTime }"  pattern="yy年MM月dd日   HH:mm:ss" />发表的评论</h4>
				<h3> ${com.usName }   发表评论 ：${com.cmContent } 
				<c:if test="${com.cmUsId == login_user.usId }">
					<a href = "javascritp:void(0)" onclick="delCom(${com.cmId })">删除</a>
				</c:if></h3>
		</c:forEach>

    </div>
</div>
<div id="bottom">
    <div class="bot-con1">
        <ul>
            <li class="bot-con1-li1">我们已经做到 </li>
            <li>单项支持人数<span class="inde-span1"></span></li>
            <li>单项筹款金额<span class="inde-span2"></span></li>
            <li>累计筹款金额<span class="inde-span3"></span></li>
        </ul>
    </div>
    <div class="bot-con1 bot-con2">
        <ul>
            <li class="bot-con1-li1">发起项目流程 </li>
            <li><span class="inde-span4"></span>发起人创建项目</li>
            <li><span class="inde-span5"></span>项目获得支持</li>
            <li><span class="inde-span6"></span>发起人发放回报</li>
            <li><span class="inde-span7"></span>用户收到回报</li>
        </ul>
    </div>
    <div class="bottom-ggt"><a href=""><img src="images/bottbom_68.jpg" alt=""/></a></div>
    <div class="zc-yqlink">
        <ul>
            <li><a href="">阿里巴巴集团</a></li>
            <li><a href="">淘宝网</a></li>
            <li><a href="">天猫</a></li>
            <li><a href="">聚划算</a></li>
            <li><a href="">全球速卖通</a></li>
            <li><a href="">阿里巴巴国际交易市场</a></li>
            <li><a href="">1688</a></li>
            <li><a href="">阿里妈妈</a></li>
            <li><a href="">阿里旅行</a></li>
            <li><a href="">阿里云计算</a></li>
            <li><a href="">阿里巴巴集团</a></li>
            <li><a href="">淘宝网</a></li>
            <li><a href="">天猫</a></li>
            <li><a href="">聚划算</a></li>
            <li><a href="">全球速卖通</a></li>
            <li><a href="">阿里巴巴国际交易市场</a></li>
            <li><a href="">1688</a></li>
            <li><a href="">阿里妈妈</a></li>
            <li><a href="">阿里云计算</a></li>
        </ul>
    </div>
    <div class="footer-bd">

            <a href=" ">关于淘宝</a>
            <a href=" ">合作伙伴</a>
            <a href=" ">营销中心</a>
            <a href=" ">廉正举报</a>
            <a href=" ">联系客服</a>
            <a href=" ">开放平台</a>
            <a href=" ">诚征英才</a>
            <a href=" ">联系我们</a>
            <a href=" ">网站地图</a>
            <a href=" ">法律声明</a>　　　
            <em>© 2003-2015 Taobao.com 版权所有</em><br>

       <br>
            <span>网络文化经营许可证：<a href=" ">浙网文[2013]0268-027号</a></span>
            <b>|</b>
            <span data-spm-protocol="i">增值电信业务经营许可证：<a href="">浙B2-20080224-1</a></span>
            <b>|</b>
            <span>信息网络传播视听节目许可证：1109364号</span>
            <b>|</b>
            <span>举报电话:0571-81683755</span>
    </div>
</div>
</body>
<script type="text/javascript">
	function addCom(){
		var cm_content = $("#cm_content").val();
		$.ajax({
			url:"com/addCom.do",
			type:"post",
			data:{"cmContent":cm_content},
			success:function(data){
				if(data == 1){
					toastr.info("发表成功");
					setTimeout("window.location.href = 'com/queryByPsId.do'",500)
				}else if(data == "-1"){
					window.location.href = "login.do"
				}else if(data == "-2"){
					window.location.href = "user_realName.do"
				}else{
					toastr.info("发表失败");
				}
			},
			error:function(){
				toastr.error("服务端错误");
			}
		})
	}
	
	function delCom(cmId){
		
		$.ajax({
			url:"com/deleteCom.do?",
			type:"post",
			data:{"cmId":cmId},
			success:function(data){
				if(data == 1){
					toastr.info("删除成功");
					setTimeout("window.location.href = 'com/queryByPsId.do'",500)
				}else{
					toastr.info("删除失败");
				}
			},
			error:function(){
				toastr.error("服务端错误");
			}
		})
	}
	
	
	
	
	
	
	
	
	
	
	
	
</script>
</html>